/* 现代化设计系统 - 渐变美学，温暖科技感 */

/* 核心设计变量 */
:root {
  /* 主渐变色系 */
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --warning-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --error-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  
  /* 主色调 */
  --primary-color: #667eea;
  --primary-hover: #5a6fd8;
  --secondary-color: #6b8aff;
  --success-color: #4facfe;
  --warning-color: #43e97b;
  --error-color: #fa709a;
  
  /* 中性色系 - 温暖灰调 */
  --gray-50: #fafbff;
  --gray-100: #f0f4ff;
  --gray-200: #e8edff;
  --gray-300: #d1deff;
  --gray-400: #a8c5ff;
  --gray-500: #6b8aff;
  --gray-600: #4f69c6;
  --gray-700: #3c4f7a;
  --gray-800: #2a344a;
  --gray-900: #1a1f2e;
  
  /* 语义色彩 */
  --surface: #ffffff;
  --background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  --card-background: rgba(255, 255, 255, 0.95);
  --glass-background: rgba(255, 255, 255, 0.1);
  --border-color: rgba(102, 126, 234, 0.1);
  --text-primary: #1a1f2e;
  --text-secondary: #3c4f7a;
  --text-muted: #6b8aff;
  
  /* 现代阴影系统 */
  --shadow-soft: 0 2px 8px rgba(102, 126, 234, 0.1);
  --shadow-medium: 0 4px 16px rgba(102, 126, 234, 0.15);
  --shadow-strong: 0 8px 32px rgba(102, 126, 234, 0.2);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.3);
  
  /* 优雅字体系统 */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  
  /* 动画时长 */
  --transition-fast: 0.15s;
  --transition-normal: 0.3s;
  --transition-slow: 0.5s;
  --easing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--background);
  overflow: hidden;
}

/* 应用启动动画 */
@keyframes appFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 布局容器 - 现代化 */
.app-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  animation: appFadeIn 0.8s var(--easing);
  position: relative;
  overflow: hidden;
}

/* 添加微妙的纹理覆盖层 */
.app-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('');
  pointer-events: none;
  z-index: 0;
}

/* 磨砂玻璃标题栏 */
.custom-titlebar {
  height: 40px;
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(245,250,255,0.95));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(102, 126, 234, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 0 12px;
  -webkit-app-region: drag;
  user-select: none;
  position: relative;
  z-index: 10;
  box-shadow: var(--shadow-soft);
}

.titlebar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  margin-right: 8px;
  object-fit: cover;
  filter: drop-shadow(0 1px 2px rgba(102, 126, 234, 0.3));
}

.app-title {
  font-size: 16px;
  font-weight: 600;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.01em;
}

.everything-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 20px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--error-color);
  transition: all var(--transition-normal) var(--easing);
  position: relative;
}

.status-dot.connected { 
  background: linear-gradient(45deg, #48ff48, #00ff88);
  box-shadow: 0 0 10px rgba(72, 255, 72, 0.4);
  animation: connectedGlow 3s ease-in-out infinite;
}

.status-dot.connecting { 
  background: linear-gradient(45deg, #ffd700, #ffb347);
  animation: connectingPulse 1.5s ease-in-out infinite;
}

@keyframes connectedGlow {
  0%, 100% { 
    box-shadow: 0 0 10px rgba(72, 255, 72, 0.4);
    transform: scale(1);
  }
  50% { 
    box-shadow: 0 0 20px rgba(72, 255, 72, 0.6);
    transform: scale(1.1);
  }
}

@keyframes connectingPulse {
  0%, 100% { 
    opacity: 1; 
    transform: scale(1);
  }
  50% { 
    opacity: 0.6;
    transform: scale(0.9);
  }
}

.status-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.window-controls {
  display: flex;
  -webkit-app-region: no-drag;
  gap: 4px;
  padding-right: 8px;
}

.control-button {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-normal) var(--easing);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.control-button:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.05);
  box-shadow: var(--shadow-medium);
}

.control-button.close:hover {
  background: linear-gradient(45deg, #fa709a, #fee140);
  color: white;
  transform: scale(1.05);
}

/* Hero搜索区域 */
.search-section {
  padding: 20px 20px;
  background: var(--primary-gradient);
  position: relative;
  z-index: 5;
  overflow: visible;
}

/* 添加几何图案背景 */
.search-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('');
  opacity: 0.3;
  pointer-events: none;
}

.search-container {
  max-width: 800px;
  margin: 0;
  position: relative;
  z-index: 10;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* 搜索标题 */
.search-title {
  color: white;
  font-size: 18px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  opacity: 0;
  animation: titleSlideIn 0.8s var(--easing) 0.3s forwards;
  white-space: nowrap;
  flex-shrink: 0;
}

@keyframes titleSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--card-background);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 12px;
  box-shadow: var(--shadow-glass);
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0;
  animation: cardSlideIn 0.8s var(--easing) 0.5s forwards;
  z-index: 20;
  flex: 1;
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.search-input {
  flex: 1;
  height: 40px;
  padding: 0 16px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  border-radius: 10px;
  transition: all var(--transition-normal) var(--easing);
}

.search-input:focus {
  background: rgba(102, 126, 234, 0.05);
}

.search-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.search-button {
  height: 40px;
  padding: 0 20px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal) var(--easing);
  box-shadow: var(--shadow-medium);
  position: relative;
  overflow: hidden;
}

.search-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
}

.search-button:active {
  transform: translateY(0);
}

.search-button:disabled {
  background: var(--gray-400);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 搜索按钮涟漪效果 */
.search-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.search-button:active::before {
  width: 300px;
  height: 300px;
}

/* 搜索中状态 */
.search-button.searching {
  background: var(--warning-gradient);
  animation: searchPulse 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes searchPulse {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(67, 233, 123, 0.7);
    transform: translateY(-2px);
  }
  50% { 
    box-shadow: 0 0 0 10px rgba(67, 233, 123, 0);
    transform: translateY(-4px);
  }
}

/* 搜索历史下拉 - 优雅浮动卡片 */
.search-history {
  position: absolute;
  top: calc(100% + 8px);
  left: 8px;
  right: 8px;
  background: var(--card-background);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: var(--shadow-glass);
  animation: historySlideIn 0.3s var(--easing);
}

@keyframes historySlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.search-history-item {
  padding: 16px 20px;
  cursor: pointer;
  border-bottom: 1px solid rgba(102, 126, 234, 0.08);
  transition: all var(--transition-normal) var(--easing);
  position: relative;
}

.search-history-item:hover {
  background: rgba(102, 126, 234, 0.05);
  transform: translateX(4px);
}

.search-history-item.active {
  background: rgba(102, 126, 234, 0.1);
  transform: translateX(4px);
}

.search-history-item:last-child {
  border-bottom: none;
}

.search-history-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--primary-gradient);
  transition: width var(--transition-normal) var(--easing);
}

.search-history-item:hover::before,
.search-history-item.active::before {
  width: 3px;
}

.search-history-query {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.search-history-everything {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  opacity: 0.8;
  background: rgba(102, 126, 234, 0.05);
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
}

/* 智能结果展示区域 */
.results-section {
  flex: 1;
  padding: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 3;
}

/* 结果概览卡片 */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding: 20px 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
  border: 1px solid rgba(102, 126, 234, 0.1);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.results-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
}

.results-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.results-count {
  font-size: 18px;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 8px;
}

.results-count::before {
  content: '📁';
  font-size: 20px;
  -webkit-text-fill-color: initial;
}

.everything-query {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.everything-query::before {
  content: '🤖';
  font-size: 14px;
}

.everything-query code {
  background: rgba(102, 126, 234, 0.08);
  padding: 4px 8px;
  font-family: var(--font-mono);
  border-radius: 6px;
  color: var(--primary-color);
  font-weight: 500;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.results-actions {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.action-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal) var(--easing);
  position: relative;
  overflow: hidden;
}

.action-button:hover {
  background: rgba(102, 126, 234, 0.05);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.action-button:active {
  transform: translateY(0);
}

.button-icon {
  font-size: 16px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* 现代化文件列表 */
.file-list {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(102, 126, 234, 0.08);
}

.file-list-header {
  display: flex;
  padding: 12px 0;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
  border-bottom: 1px solid rgba(102, 126, 234, 0.1);
  font-weight: 600;
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-radius: 12px 12px 0 0;
  position: relative;
}

.file-list-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-gradient);
  opacity: 0.3;
}

.file-list-body {
  flex: 1;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 0 0 12px 12px;
}

.file-list-column {
  padding: 0 16px;
  cursor: pointer;
  transition: all var(--transition-normal) var(--easing);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.file-list-column:hover {
  color: var(--primary-color);
  transform: translateY(-1px);
}

.file-list-column.sortable::after {
  content: '↕';
  margin-left: 6px;
  opacity: 0.4;
  font-size: 10px;
  transition: all var(--transition-normal) var(--easing);
}

.file-list-column.sortable:hover::after {
  opacity: 0.8;
  transform: scale(1.2);
}

.file-list-column.sort-asc::after {
  content: '↑';
  opacity: 1;
  color: var(--primary-color);
  filter: drop-shadow(0 0 4px rgba(102, 126, 234, 0.4));
}

.file-list-column.sort-desc::after {
  content: '↓';
  opacity: 1;
  color: var(--primary-color);
  filter: drop-shadow(0 0 4px rgba(102, 126, 234, 0.4));
}

/* 列宽度现在由JavaScript动态控制 */
.col-name { flex: none; }
.col-path { flex: none; }
.col-size { flex: none; text-align: right; }
.col-modified { flex: none; }
.col-type { flex: none; text-align: center; }
.col-created { flex: none; }
.col-accessed { flex: none; }
.col-attributes { flex: none; }
.col-run-count { flex: none; text-align: center; }

/* 现代化文件行 */
.file-row {
  display: flex;
  padding: 14px 0;
  border-bottom: 1px solid rgba(102, 126, 234, 0.05);
  cursor: pointer;
  transition: all var(--transition-normal) var(--easing);
  position: relative;
  background: transparent;
}

.file-row:hover {
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.03) 0%, rgba(102, 126, 234, 0.01) 100%);
  transform: translateX(4px);
  box-shadow: inset 4px 0 0 var(--primary-color), var(--shadow-soft);
}

.file-row:last-child {
  border-bottom: none;
}

.file-row:active {
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, rgba(102, 126, 234, 0.02) 100%);
  transform: translateX(2px);
}

/* 文件行发光效果 */
.file-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--primary-gradient);
  transition: width var(--transition-normal) var(--easing);
  border-radius: 0 4px 4px 0;
}

.file-cell {
  padding: 0 16px;
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  transition: all var(--transition-fast) var(--easing);
}

.file-cell.col-name {
  gap: 12px;
  padding-left: 20px;
}

.file-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  transition: transform var(--transition-fast) var(--easing);
}

.file-row:hover .file-icon {
  transform: scale(1.1);
}

.file-name {
  color: var(--text-primary);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.file-path {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  opacity: 0.8;
  font-weight: 400;
}

.file-size {
  color: var(--text-secondary);
  text-align: right;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.file-modified {
  color: var(--text-secondary);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  opacity: 0.9;
}

.file-type {
  color: var(--primary-color);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: rgba(102, 126, 234, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

/* 列宽调整器样式 */
.column-resizer {
  position: absolute;
  right: -2px;
  top: 0;
  bottom: 0;
  width: 4px;
  cursor: col-resize;
  background: transparent;
  z-index: 10;
  transition: background-color var(--transition-normal) var(--easing);
  border-radius: 2px;
}

.column-resizer::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: rgba(102, 126, 234, 0.2);
  transform: translateX(-50%);
  transition: all var(--transition-normal) var(--easing);
  border-radius: 1px;
}

.column-resizer:hover {
  background: rgba(102, 126, 234, 0.08);
}

.column-resizer:hover::before {
  background: var(--primary-color);
  width: 2px;
  box-shadow: 0 0 4px rgba(102, 126, 234, 0.3);
}

.column-resizer:active {
  background: rgba(102, 126, 234, 0.15);
}

/* 拖拽时的全局样式 */
.file-list-header.dragging {
  user-select: none;
}

.file-list-header.dragging .file-list-column {
  pointer-events: none;
}

.file-list-header.dragging .column-resizer {
  pointer-events: all;
}

/* 拖拽时的光标样式 */
body.column-resizing {
  cursor: col-resize !important;
}

body.column-resizing * {
  cursor: col-resize !important;
}

/* 现代化空状态 */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px;
  text-align: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(248,250,255,0.9) 100%);
  border-radius: 12px;
  margin: 20px;
  border: 1px solid rgba(102, 126, 234, 0.08);
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 24px;
  opacity: 0.6;
  animation: floatAnimation 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.1));
}

@keyframes floatAnimation {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.empty-state-text {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.empty-state-subtext {
  font-size: 15px;
  opacity: 0.8;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 400px;
}

/* 搜索建议样式 */
.search-suggestions {
  margin-top: 32px;
  text-align: center;
}

.suggestion-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 16px;
  opacity: 0.9;
}

.suggestion-items {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.suggestion-item {
  padding: 8px 16px;
  background: rgba(102, 126, 234, 0.08);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 20px;
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal) var(--easing);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.suggestion-item:hover {
  background: rgba(102, 126, 234, 0.15);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.suggestion-item:active {
  transform: translateY(0);
}

/* 搜索建议入场动画 */
.suggestion-item {
  animation: suggestionSlideIn 0.6s var(--easing) forwards;
  opacity: 0;
}

.suggestion-item:nth-child(1) { animation-delay: 0.1s; }
.suggestion-item:nth-child(2) { animation-delay: 0.2s; }
.suggestion-item:nth-child(3) { animation-delay: 0.3s; }

@keyframes suggestionSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 现代化加载状态 */
.loading-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px;
  gap: 20px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(102, 126, 234, 0.1);
  border-top: 3px solid transparent;
  border-radius: 50%;
  animation: modernSpin 1.2s linear infinite;
  background: conic-gradient(from 0deg, var(--primary-color), var(--secondary-color), var(--primary-color));
  mask: radial-gradient(circle at center, transparent 60%, black 61%);
  -webkit-mask: radial-gradient(circle at center, transparent 60%, black 61%);
}

@keyframes modernSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 500;
  opacity: 0.8;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0.4; }
}

/* 现代化成功状态 */
.success-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px;
  text-align: center;
  background: linear-gradient(135deg, rgba(67, 233, 123, 0.05) 0%, rgba(56, 249, 215, 0.05) 100%);
  border-radius: 12px;
  margin: 20px;
  border: 1px solid rgba(67, 233, 123, 0.2);
}

.success-icon {
  font-size: 56px;
  margin-bottom: 20px;
  background: var(--success-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: successBounce 0.6s ease-out;
}

@keyframes successBounce {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.1); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

.success-message {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--success-color);
  line-height: 1.5;
  max-width: 400px;
}

/* 现代化错误状态 */
.error-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px;
  text-align: center;
  background: linear-gradient(135deg, rgba(250, 112, 154, 0.03) 0%, rgba(254, 225, 64, 0.03) 100%);
  border-radius: 12px;
  margin: 20px;
  border: 1px solid rgba(250, 112, 154, 0.1);
}

.error-icon {
  font-size: 56px;
  margin-bottom: 20px;
  background: var(--error-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shakeAnimation 0.5s ease-in-out;
}

@keyframes shakeAnimation {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.error-message {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--error-color);
  line-height: 1.5;
  max-width: 400px;
}

/* 优雅状态栏 */
.status-bar {
  height: 32px;
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(245,250,255,0.95) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(102, 126, 234, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 12px;
  color: var(--text-secondary);
  position: relative;
  z-index: 8;
}

.status-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-gradient);
  opacity: 0.6;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-text {
  font-weight: 500;
  padding: 2px 8px;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.status-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-separator {
  color: rgba(102, 126, 234, 0.3);
  font-weight: 300;
}

.status-settings-button {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 8px;
  width: 24px;
  height: 24px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-normal) var(--easing);
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-settings-button:hover {
  color: var(--primary-color);
  background: rgba(102, 126, 234, 0.05);
  border-color: var(--primary-color);
  transform: scale(1.05);
}

/* 现代化滚动条样式 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(102, 126, 234, 0.05);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-gradient);
  border-radius: 3px;
  transition: all var(--transition-normal) var(--easing);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a5acd 100%);
  transform: scaleY(1.2);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* 现代化响应式设计 */
@media (max-width: 1024px) {
  .search-section {
    padding: 24px 16px;
  }
  
  .search-title {
    font-size: 20px;
  }
  
  /* 保持动态列宽但调整默认值 */
  .col-path { 
    min-width: 250px; 
  }
  .col-modified { 
    min-width: 110px; 
  }
}

@media (max-width: 768px) {
  .custom-titlebar {
    padding: 0 0 0 8px;
    height: 36px;
  }
  
  .app-title {
    font-size: 14px;
  }
  
  .everything-status {
    margin-left: 12px;
    padding: 2px 8px;
  }
  
  .search-section {
    padding: 20px 16px;
  }
  
  .search-title {
    font-size: 18px;
    margin-bottom: 20px;
  }
  
  .search-input-wrapper {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }
  
  .search-input {
    height: 48px;
  }
  
  .search-button {
    height: 48px;
    width: 100%;
  }
  
  .results-section {
    padding: 16px;
  }
  
  .results-header {
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .results-actions {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .file-list-header,
  .file-row {
    padding: 8px 0;
  }
  
  .file-cell {
    padding: 0 8px;
    font-size: 13px;
  }
  
  .file-icon {
    font-size: 16px;
    width: 20px;
  }
  
  /* 在小屏幕上隐藏次要列和列调整器 */
  .col-type,
  .col-created,
  .col-accessed,
  .col-attributes,
  .col-run-count {
    display: none;
  }
  
  .column-resizer {
    display: none;
  }
  
  /* 移动设备上恢复flex布局 */
  .col-name { flex: 2 !important; min-width: 140px; width: auto !important; max-width: none !important; }
  .col-path { flex: 2.5 !important; min-width: 180px; width: auto !important; max-width: none !important; }
  .col-size { flex: 1 !important; min-width: 60px; width: auto !important; max-width: none !important; }
  .col-modified { flex: 1.5 !important; min-width: 90px; width: auto !important; max-width: none !important; }
}

/* 性能优化 */
.file-row,
.search-input-wrapper,
.action-button,
.control-button {
  will-change: transform;
}

/* 无障碍支持 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
  :root {
    --border-color: #000;
    --text-primary: #000;
    --text-secondary: #333;
  }
}

/* 新增字段的列样式现在由JavaScript动态控制 */

/* 文件属性显示样式 */
.file-attributes {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-run-count {
  text-align: center;
  color: var(--text-secondary);
}

/* AI调试面板样式 */
.debug-section {
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,250,255,0.95) 100%);
  border: 1px solid rgba(102, 126, 234, 0.1);
  border-radius: 12px;
  margin: 0 24px 16px 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-soft);
  max-height: 300px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 4;
  overflow: hidden;
}

.debug-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  border-bottom: 1px solid rgba(102, 126, 234, 0.1);
  position: relative;
}

.debug-header::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-gradient);
  opacity: 0.4;
}

.debug-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 8px;
}

.debug-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.debug-clear-button,
.debug-toggle-button {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 8px;
  border: 1px solid rgba(102, 126, 234, 0.2);
  cursor: pointer;
  transition: all var(--transition-normal) var(--easing);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.debug-clear-button:hover,
.debug-toggle-button:hover {
  background: rgba(102, 126, 234, 0.1);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: scale(1.05);
}

.debug-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  background: var(--surface);
  position: relative;
}

.debug-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  height: 200px;
  color: var(--text-secondary);
}

.debug-empty-icon {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.6;
  animation: floatAnimation 3s ease-in-out infinite;
}

.debug-empty-text {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.debug-empty-subtext {
  font-size: 14px;
  opacity: 0.8;
  line-height: 1.5;
  max-width: 300px;
}

.debug-messages {
  padding: 8px 0;
}

.debug-message {
  display: flex;
  flex-direction: column;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(102, 126, 234, 0.05);
  transition: all var(--transition-fast) var(--easing);
  position: relative;
  background: transparent;
}

.debug-message:hover {
  background: rgba(102, 126, 234, 0.02);
}

.debug-message:last-child {
  border-bottom: none;
}

.debug-timestamp {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 4px;
  opacity: 0.7;
  font-weight: 500;
}

.debug-message-content {
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}

.debug-stream-chunk {
  color: var(--text-primary);
  font-family: var(--font-mono);
  background: rgba(102, 126, 234, 0.03);
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid var(--primary-color);
  margin: 2px 0;
  white-space: pre-wrap;
  animation: debugMessageSlideIn 0.3s var(--easing);
}

.debug-result {
  color: var(--success-color);
  background: rgba(74, 222, 128, 0.05);
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid var(--success-color);
  animation: debugMessageSlideIn 0.3s var(--easing);
}

.debug-result strong {
  color: #16a34a;
  font-weight: 600;
}

.debug-error {
  color: var(--error-color);
  background: rgba(250, 112, 154, 0.05);
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid var(--error-color);
  animation: debugMessageSlideIn 0.3s var(--easing);
}

.debug-error strong {
  color: #dc2626;
  font-weight: 600;
}

.debug-info {
  color: var(--text-secondary);
  background: rgba(102, 126, 234, 0.05);
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid var(--text-secondary);
  animation: debugMessageSlideIn 0.3s var(--easing);
}

/* 调试消息类型标识 */
.debug-stream::before {
  content: '💬';
  margin-right: 8px;
  font-size: 12px;
}

.debug-result::before {
  content: '✅';
  margin-right: 8px;
  font-size: 12px;
}

.debug-error::before {
  content: '❌';
  margin-right: 8px;
  font-size: 12px;
}

.debug-info::before {
  content: 'ℹ️';
  margin-right: 8px;
  font-size: 12px;
}

@keyframes debugMessageSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 调试面板响应式设计 */
@media (max-width: 768px) {
  .debug-section {
    margin: 0 16px 12px 16px;
    max-height: 250px;
  }
  
  .debug-header {
    padding: 12px 16px;
  }
  
  .debug-header h3 {
    font-size: 14px;
  }
  
  .debug-clear-button,
  .debug-toggle-button {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  
  .debug-message {
    padding: 10px 16px;
  }
  
  .debug-message-content {
    font-size: 12px;
  }
  
  .debug-empty {
    padding: 30px 16px;
    height: 150px;
  }
  
  .debug-empty-icon {
    font-size: 28px;
  }
  
  .debug-empty-text {
    font-size: 14px;
  }
  
  .debug-empty-subtext {
    font-size: 13px;
  }
} 